//
//  XBContactCell.m
//  FindPreciousFrameWork
//
//  Created by GK on 16/4/7.
//  Copyright © 2016年 MoreMoney. All rights reserved.
//

#import "XBContactCell.h"

@interface XBContactCell ()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *lblName;
@property (weak, nonatomic) IBOutlet UILabel *lblcontact;
@property (weak, nonatomic) IBOutlet UILabel *lblTime;





@end
@implementation XBContactCell


+ (instancetype)contactCell:(UITableView *)tableView
{
    NSString *ID = @"contact";
    XBContactCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if(cell == nil)
        cell = [[[NSBundle mainBundle]loadNibNamed:@"XBContactCell" owner:nil options:nil]lastObject];
    return cell;
}

- (void)setContact:(XBContact *)contact
{
    _contact = contact;
    self.iconView.image = [UIImage imageNamed:contact.icon];
    self.lblName.text = contact.name;
    self.lblTime.text = contact.time;
    self.lblcontact.text = contact.lastword;
}



@end
